package edu.zut.software.identity.domain;

import com.sun.istack.Nullable;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author Weining
 */
@Entity(name = "teacher")
@Data
public class Teacher {
    @Id
    @Column
    String id;
    @Column
    String name;
    @Column
    int px;
    @Column
            @Nullable
    int wxId;
    @Column
    String iphone;
    @Column
    String collegeId;
    @Column
    String majorId;
    @Column
    Date time;
    @Transient
    String collegeName;
    @Transient
    String majorName;


    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPx() {
        return px;
    }

    public void setPx(int px) {
        this.px = px;
    }

    public int getWxId() {
        return wxId;
    }

    public void setWxId(int wxId) {
        this.wxId = wxId;
    }

    public String getIphone() {
        return iphone;
    }

    public void setIphone(String iphone) {
        this.iphone = iphone;
    }

    public String getCollegeId() {
        return collegeId;
    }

    public void setCollegeId(String collegeId) {
        this.collegeId = collegeId;
    }

    public String getMajorId() {
        return majorId;
    }

    public void setMajorId(String majorId) {
        this.majorId = majorId;
    }

    public String getCollegeName() {
        return collegeName;
    }

    public void setCollegeName(String collegeName) {
        this.collegeName = collegeName;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", px=" + px +
                ", wxId=" + wxId +
                ", iphone='" + iphone + '\'' +
                ", collegeId='" + collegeId + '\'' +
                ", majorId='" + majorId + '\'' +
                ", collegeName='" + collegeName + '\'' +
                ", majorName='" + majorName + '\'' +
                '}';
    }
}
